<!doctype html>
<html xmlns="http://www.w3.org/1999/html">
<head>
    <meta charset="utf-8">
    <link rel="stylesheet" href="__PUBLIC__/Admin/css/base.css" />
    <link rel="stylesheet" href="__PUBLIC__/Admin/css/info-reg.css" />
    <title></title>
</head>

<body>
<div class="title"><h2>修改产品</h2></div>
<form action="updateproduct" method="post" enctype="multipart/form-data">
    <div class="main">
        <p class="short-input ue-clear">
            <label>产品名称</label>
            <input type="text" name="pname" placeholder="产品名称"  value="{$hh.pname}"/>
        </p>
        <p class="short-input ue-clear">
            <label>产品类型</label>
            <select name="tid"  >
<volist name="td" id="ll">
    <if condition="$ll.tid eq $hh.tid ">  <option value="{$ll.tid}" selected>{$ll.tname}</option>
        <else/> <option value="{$ll.tid}" >{$ll.tname}</option></if>
</volist>
            </select>
        </p>
        <p class="short-input ue-clear">
            <label>上传产品图片</label>
            <input type="file" name="pic" />
        </p>

        <p class="short-input ue-clear">
            <label>产品说明：</label>
            <textarea placeholder="产品说明" name="pdeclare">{$hh.pdeclare}</textarea>
        </p>

    </div>
    <input type="hidden" name="pid" value="{$hh.pid}">
    <div class="btn ue-clear">
        <a href="javascript:;" class="confirm">确定</a>
        <a href="javascript:;" class="clear">清空内容</a>
    </div>
</form>
</body>
<script type="text/javascript" src="__PUBLIC__/Admin/js/jquery.js"></script>
<script type="text/javascript" src="__PUBLIC__/Admin/js/common.js"></script>
<script type="text/javascript" src="__PUBLIC__/Admin/js/WdatePicker.js"></script>
<script type="text/javascript">
    $(".select-title").on("click",function(){
        $(".select-list").toggle();
        return false;
    });
    $(".select-list").on("click","li",function(){
        var txt = $(this).text();
        $(".select-title").find("span").text(txt);
    });
    $(function(){
        //给确定按钮绑定一个点击事件
        $('.confirm').on('click',function(){
            //事件的处理程序
            $('form').submit();
        });

        //给清空内容按钮绑定一个点击事件
        $('.clear').on('click',function(){
            //事件的处理程序
            $('form')[0].reset();
        });
    });

    showRemind('input[type=text], textarea','placeholder');
</script>
</html>
